<template>
  <div class="home">
    <!-- 左侧的导航栏？ -->
    <div class="home-left">
      <Left></Left>
    </div>
    <div class="home-right">
      <!-- 头部模块 -->
      <div class="top">
        <Header></Header>
      </div>
      <!-- 内容模块 -->
      <div class="contents" :style="{height:conthetght+'px'}">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<script>
  // @ is an alias to /src
  import Left from "@/components/Left.vue"
  import Header from "@/components/Header.vue"
  export default {
    name: 'Home',
    data() {
      return {
        conthetght: 0
      }
    },
    components: {
      Left,
      Header
    },
    mounted() {
      this.getHeight()
    },
    methods: {
      getHeight() {
        let cont = window.screen.availHeight - 225
        this.conthetght=cont
      }
    }
  }
</script>

<style scoped lang="less">
  .home {
    width: 100%;
    height: 100%;
    display: flex;
    .home-left {
      height: 100%;

    }

    .home-right {
      flex: 1;
      //  width: 100%;
      //  height: 100%;
      background-color: #fff;

      .top {
        background-color: #aaa;
      }

      .contents {
        display: flex;
        overflow-y: auto;
        // overflow: hidden;
        width: 100%;
        padding: 10px 10px;
        background-color: #E2E4CE;
      }
    }
  }
</style>